﻿<Page
    x:Class="Philosophy.PageRecord"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Philosophy"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.Resources>
        <CollectionViewSource 
            x:Name="cvsMain" 
            IsSourceGrouped="true" 
            ItemsPath="_People">
        </CollectionViewSource>
    </Page.Resources>

    <Grid Style="{StaticResource LayoutRootStyle}">
        <Grid.Background>
            <ImageBrush ImageSource="Assets/Кубок.jpg"/>
        </Grid.Background>
        <Grid HorizontalAlignment="Left" Height="768" VerticalAlignment="Top" Width="1366" Background="{StaticResource ComboBoxItemDisabledForegroundThemeBrush}">
            <TextBlock HorizontalAlignment="Left" Height="47" Margin="95,37,0,0" TextWrapping="Wrap" Text="Рекорды" VerticalAlignment="Top" Width="234" FontSize="36"/>
            <Button x:Name="Back_of_MainPage" Style="{StaticResource PreviousAppBarButtonStyle}" Margin="-7,23,0,673" Width="78" AutomationProperties.Name="" Visibility="Visible" Click="Back_of_MainPage_Click"/>
            <TextBlock HorizontalAlignment="Left" Height="31" Margin="101,109,0,0" TextWrapping="Wrap" Text="Рейтинг" VerticalAlignment="Top" Width="110" FontSize="22" Foreground="#FFB4AFAF"/>
            <TextBlock HorizontalAlignment="Left" Height="31" Margin="257,109,0,0" TextWrapping="Wrap" Text="Имя игрока" VerticalAlignment="Top" Width="156" FontSize="22" Foreground="#FFB4AFAF"/>
            <TextBlock HorizontalAlignment="Left" Height="31" Margin="525,109,0,0" TextWrapping="Wrap" Text="Тема" VerticalAlignment="Top" Width="110" FontSize="22" Foreground="#FFB4AFAF"/>
            <TextBlock HorizontalAlignment="Left" Height="31" Margin="796,109,0,0" TextWrapping="Wrap" Text="Очков" VerticalAlignment="Top" Width="110" FontSize="22" Foreground="#FFB4AFAF"/>
            <TextBlock HorizontalAlignment="Left" Height="31" Margin="949,109,0,0" TextWrapping="Wrap" Text="Вопросов" VerticalAlignment="Top" Width="110" FontSize="22" Foreground="#FFB4AFAF"/>
            <TextBlock HorizontalAlignment="Left" Height="31" Margin="1145,109,0,0" TextWrapping="Wrap" Text="Время (мин.)" VerticalAlignment="Top" Width="146" FontSize="22" Foreground="#FFB4AFAF"/>
            <Button Style="{StaticResource TextPrimaryButtonStyle}" Margin="997,41,0,684" >
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Спринт"  Margin="3,3,10,10" Style="{StaticResource GroupHeaderTextStyle}" FontSize="30" />
                </StackPanel>
            </Button>
            <Button Style="{StaticResource TextPrimaryButtonStyle}" Margin="1133,41,0,684" >
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Марафон"  Margin="3,3,10,10" Style="{StaticResource GroupHeaderTextStyle}" FontSize="30" />
                </StackPanel>
            </Button>
            <TextBlock HorizontalAlignment="Left" Height="46" Margin="1115,46,0,0" TextWrapping="Wrap" Text="|" VerticalAlignment="Top" Width="38" FontSize="30"/>
            <GridView 
                x:Name="GridTableRecords"
                HorizontalAlignment="Left"
                Height="519" Width="1271"
                Margin="95,177,0,0"
                VerticalAlignment="Top"
                IsItemClickEnabled="True"
                ItemsSource="{Binding Source={StaticResource cvsMain}}" 
                SelectionMode="None">

                <GridView.ItemTemplate>
                    <DataTemplate>
                        <Grid 
                            Style="{StaticResource LayoutRootStyle}"
                            Background="{StaticResource ComboBoxItemDisabledForegroundThemeBrush}"
                            HorizontalAlignment="Left"
                            Width="1175" Height="35">
                            <StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Background="{x:Null}">
                                <TextBlock Text="{Binding Top}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Margin="35,0,15,8" FontSize="18" FontWeight="Normal"/>
                                <TextBlock Text="{Binding Name}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Margin="105,0,15,8" FontSize="18" FontWeight="Normal"/>
                                <TextBlock Text="{Binding Tema}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Margin="180,0,15,8" FontSize="18" FontWeight="Normal"/>
                                <TextBlock Text="{Binding Score}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Margin="115,0,15,8" FontSize="18" FontWeight="Normal"/>
                                <TextBlock Text="{Binding CountWinQuestions}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Margin="140,0,15,8" FontSize="18" FontWeight="Normal"/>
                                <TextBlock Text="{Binding Time}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Margin="165,0,15,8" FontSize="18" FontWeight="Normal"/>
                            </StackPanel>
                        </Grid>
                    </DataTemplate>
                </GridView.ItemTemplate>

                <GridView.GroupStyle>
                    <GroupStyle>
                        <GroupStyle.HeaderTemplate>
                            <DataTemplate>
                            </DataTemplate>
                        </GroupStyle.HeaderTemplate>
                        <GroupStyle.Panel>
                            <ItemsPanelTemplate>
                                <VariableSizedWrapGrid Orientation="Vertical" Margin="0,0,80,0"/>
                            </ItemsPanelTemplate>
                        </GroupStyle.Panel>
                    </GroupStyle>
                </GridView.GroupStyle>

                <GridView.ItemsPanel>
                    <ItemsPanelTemplate>
                        <VirtualizingStackPanel Orientation="Horizontal"/>
                    </ItemsPanelTemplate>
                </GridView.ItemsPanel>

            </GridView>
        </Grid>
    </Grid>
</Page>